@import '~antd/lib/style/themes/default.less';

/*antd table 表格*/

@ur-table-border-color: #bbbbbb; //边框颜色
@ur-table-thead-bg-color: #EEEEEE; //表头背景色
@ur-table-odd-bg-color: #EFF5FF; //fade(@primary-color, 5%)斑马线背景色为透明度5%的#0066FF；

.odd {
  background-color: @ur-table-odd-bg-color;

  & > td {
    background-color: inherit;
  }
}

.ur-ant-table {
  padding: 0;
}

:global {

  .ur-ant-table .ant-pro-card-body {
    padding: 0;
  }
  //选中行：行的背景色为透明度100%的#0066FF，数据内容反白
  /* .ant-table-tbody > tr.ant-table-row-selected > td {
     background: @primary-color;
     color: @text-color-inverse;
   }*/

  .ant-table-small > .ant-table-content > .ant-table-body > table > .ant-table-tbody > tr > td {
    padding: 4px 8px;
  }

  .ant-table-small > .ant-table-content > .ant-table-body > table {
    padding: 0;
  }

  /*.ant-table-fixed-header .ant-table-scroll .ant-table-header {
    margin-bottom: -17px !important;
    padding-bottom: 0 !important;
    background: #f0f0f0;
  }*/

  /*ant-table,标题居中、加粗显示*/

  .ant-table-thead > tr > th {
    text-align: center !important;
    font-weight: normal;
    background: @ur-table-thead-bg-color !important;
  }

  /*ant-table,内容居中显示*/

  .ant-table-text-center {
    text-align: center;
  }

  .ant-table-text-center > .ant-tag {
    margin-right: 0;
  }

  .ant-table-text-left {
    text-align: left;
  }

  .ant-table-text-left > .ant-tag {
    font-size: 14px;
  }

  .ant-table-text-left > .ant-tag-2em {
    margin-left: 2em;
  }

  /*ant-table,内容居右显示*/

  .ant-table-text-right {
    text-align: right;
  }

  .ant-table-text-right > .ant-tag {
    margin-right: 0;
    font-size: 14px;
  }

  .ant-table-pagination.ant-pagination {
    margin: 4px 0 !important;
  }

  .ant-table-expand-icon-th,
  .ant-table-row-expand-icon-cell {
    width: 35px;
    min-width: 35px;
  }

  .ant-table-tbody > tr.ant-table-row-selected > td {
    border-color: @ur-table-border-color;
  }

  .ant-table.ant-table-bordered .ant-table-thead > tr > th,
  .ant-table.ant-table-bordered:not(.ant-table-empty) .ant-table-tbody > tr > td {
    border-bottom: 1px solid @ur-table-border-color;
  }

  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > thead > tr:not(:last-child) > th {
    border-bottom: 1px solid @ur-table-border-color;
  }

  /*.ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr {
    border-bottom: 1px solid @ur-table-border-color !important;
  }

  .ant-table-bordered .ant-table-thead > tr:not(:last-child) > th {
    border-bottom: 1px solid @ur-table-border-color;
  }*/

  /*.ant-table-small {
    border: 1px solid @ur-table-border-color !important;
  }*/

  .ant-table-cell-scrollbar {
    box-shadow: 0 1px 0 1px @ur-table-border-color;
  }

  .ant-table-small > .ant-table-content > .ant-table-body {
    margin: 0;
  }

  .ant-table.ant-table-bordered > .ant-table-container {
    border: 1px solid @ur-table-border-color !important;
  }

  .ant-pro-table .ant-card-body {
    padding: 0;
  }

  /*去除后一列右侧边框*/

  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > thead > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > thead > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tbody > tr > td:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > tbody > tr > td:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > tbody > tr > td:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tfoot > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > tfoot > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > tfoot > tr > th:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tfoot > tr > td:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > tfoot > tr > td:not(:last-child),
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > tfoot > tr > td:not(:last-child) {
    border-right: 1px solid @ur-table-border-color;
  }

  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > thead > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > thead > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > thead > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tbody > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > tbody > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > tbody > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-content > table > tfoot > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-header > table > tfoot > tr > .ant-table-cell-fix-right-first::after,
  .ant-table.ant-table-bordered > .ant-table-container > .ant-table-body > table > tfoot > tr > .ant-table-cell-fix-right-first::after {
    border-right: 1px solid @ur-table-border-color;
  }

  /*行内编辑有input时*/

  .editable-cell {
    position: relative;
  }

  .editable-cell-value-wrap {
    padding: 5px 12px;
    cursor: pointer;
    min-height: 32px;
  }

  .editable-row:hover .editable-cell-value-wrap {
    padding: 4px 11px;
    border: 1px solid #d9d9d9;
    border-radius: @border-radius-base;
  }

  .editable-row .ant-form-item {
    margin: 0;
  }

  .editable-row > td {
    padding: 3px 8px !important;
  }
}
